package com.bazhua.bazo.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.bazhua.bazo.repository.entity.Coupon;
import com.bazhua.bazo.repository.entity.CouponRecord;

import java.util.List;

/**
 * @Author: starmile
 * @Description:
 * @Create: 2021-01-26 0:42
 **/
public interface ICouponRecordService extends IService<CouponRecord> {

    Integer getCouponRecordCount(Long couponId, Integer status, Long userId);

    CouponRecord getCouponRecordByCouponId(Long couponId, Integer status, Long userId);

    CouponRecord getCouponRecordByNumber(String couponNumber);

    CouponRecord checkCouponRecord(String couponNumber, Long userId);

    void saveCouponRecord(CouponRecord couponRecord);

    Page<CouponRecord> getCouponRecordPage(Page<CouponRecord> page, QueryWrapper<CouponRecord> queryWrapper);

    CouponRecord getCouponRecord(Long couponRecordId);
}
